#include "led.h"

#include "gpio.h"

#include "FreeRTOS.h"
#include "task.h"


SYS_STATUS g_sys_status = SYS_NORMAL;



void led_task(void *pvParameters)
{
    
    while(1)
    {
        switch (g_sys_status)
        {
        case SYS_NORMAL:
            LED_ON;
            vTaskDelay(pdMS_TO_TICKS(1000));
            LED_OFF;
            vTaskDelay(pdMS_TO_TICKS(1000));
            break;
        
        case SYS_ERROR:
            LED_ON;
            vTaskDelay(pdMS_TO_TICKS(100));
            LED_OFF;
            vTaskDelay(pdMS_TO_TICKS(100));
            break;

        default:
            break;
        }


  
        ;;
    }
}


